package com.lhz.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lhz.mapper.JobLogMapper;
import com.lhz.model.entity.JobLog;
import com.lhz.service.LogService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @Author: LiHuaZhi
 * @Date: 2021/8/9 21:52
 * @Description:
 **/
@Service
@Slf4j
public class LogServiceImpl extends ServiceImpl<JobLogMapper, JobLog> implements LogService {

    @Resource
    private JobLogMapper jobLogMapper;

    /**
     * 任务日志
     *
     * @param jobLog
     * @return
     */
    @Override
    @Async
    public void insertLog(JobLog jobLog) {
        jobLogMapper.insert(jobLog);
    }
}
